package com.wxq.product.feign;

import com.wxq.common.to.SkuReductionTO;
import com.wxq.common.to.SpuBoundTO;
import com.wxq.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author Jim
 * @date 4:53 下午 2022/3/27
 * @description 优惠服务远程接口
 * @email:huwmz04153277@126.com
 */
@FeignClient("yomall-coupon")
public interface CouponFeignService {

    /**
     * 1:RequestBody转对象为json
     * 2：将转为json的数据发送
     * 3：将返回的json转为该对象
     * json结构兼容即可转，所以不一定要用同一对象
     * @param spuBoundTO
     * @return
     */
    @PostMapping("/coupon/spubounds/save")
    R saveSpuBounds(@RequestBody SpuBoundTO spuBoundTO);

    /**
     * 保存满减优惠及会员折扣
     * @param skuReductionTO
     * @return
     */
    @PostMapping("coupon/skufullreducton/savareduction")
    R saveReducttion(@RequestBody SkuReductionTO skuReductionTO);


}
